const httpUrl = '*****'
let myFun = {
  tabAct:(num,tag)=>{
    console.log(this)
    this[tag] = num;
  },
  dateFormat:(dataStr,ti)=>{
    let time = new Date(dataStr);
    function timeAdd0(str) {
      if(str<10){
        str='0'+str;
      }
      return str
    }
    let y = time.getFullYear();
    let m = time.getMonth()+1;
    let d = time.getDate();
    let h = time.getHours();
    let mm = time.getMinutes();
    let s = time.getSeconds();
    if(ti===1){
      return y+'-'+timeAdd0(m)+'-'+timeAdd0(d)+' '+timeAdd0(h)+':'+timeAdd0(mm);
    }else {
      return y+'-'+timeAdd0(m)+'-'+timeAdd0(d);
    }
  }
}

export default {
  httpUrl,
  myFun
}
